// ThreadSafeRecordset.h: interface for the CThreadSafeRecordset class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_THREADSAFERECORDSET_H__A6C5C711_AF58_45F1_8A39_7B5E8AA290AC__INCLUDED_)
#define AFX_THREADSAFERECORDSET_H__A6C5C711_AF58_45F1_8A39_7B5E8AA290AC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CThreadSafeRecordset : public CRecordset  
{
public:
	CThreadSafeRecordset(CDatabase* pDatabase = NULL);
	DECLARE_DYNAMIC(CThreadSafeRecordset)

  virtual BOOL Open(UINT nOpenType = AFX_DB_USE_DEFAULT_TYPE, LPCTSTR lpszSQL = NULL, DWORD dwOptions = none);
  virtual void Close();
  virtual void AddNew();
  virtual void Delete();
  virtual void Edit();
  virtual BOOL Update();
  virtual void MoveNext();
  virtual void Move(long nRows, WORD wFetchType = SQL_FETCH_RELATIVE);
  virtual BOOL Requery();
  virtual BOOL Check(RETCODE nRetCode) const;
  virtual BOOL IsEOF() const;
  virtual BOOL IsBOF() const;
  virtual void CheckRowsetError(RETCODE nRetCode);
  virtual void DoBulkFieldExchange(CFieldExchange* pFX);
  virtual void DoFieldExchange(CFieldExchange* pFX);
  virtual CString GetDefaultConnect();
  virtual CString GetDefaultSQL();
  virtual void OnSetOptions(HSTMT hstmt);
  virtual void SetRowsetSize(DWORD dwNewRowsetSize);

protected:
  static CCriticalSection m_csProtect;
};

#endif // !defined(AFX_THREADSAFERECORDSET_H__A6C5C711_AF58_45F1_8A39_7B5E8AA290AC__INCLUDED_)
